#ifndef UICONTROL_UPDATEWINDOW_H
#define UICONTROL_UPDATEWINDOW_H

#include <QDialog>
#include <QProgressBar>
#include <QNetworkRequest>
class QPushButton;
class QNetworkAccessManager;
class QNetworkReply;
class QLabel;
namespace bap {
	class UpdateWindow :public QDialog {
		Q_OBJECT
	public:
		UpdateWindow();
		~UpdateWindow();
		public slots:
		void ReplyFinishedSlot(QNetworkReply*reply);
		void Update();
		void Cancel();
	private:
		void CheckVersion();
		QLabel* m_MessageLabel;
		QProgressBar *m_ProgressBar;
		QPushButton* m_Update;
		QPushButton* m_Cancel;

		QNetworkAccessManager*m_AccessManager;
		QNetworkRequest m_Request;
		QNetworkReply *m_Reply;
		QString m_CurrentVersion;
		QString m_NewVersion;

	};
}
#endif // !UPDATE_MAINWINDOW_H
